package com.rzjm.api;

import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.transaction.annotation.EnableTransactionManagement;
import org.springframework.transaction.annotation.Transactional;

@SpringBootApplication
@Transactional
@EnableScheduling  //  执行 定时任务
@MapperScan({"com.rzjm.api.dao"})
@EnableTransactionManagement
public class YdChargerApiApplication {

    public static void main(String[] args) {
        SpringApplication.run(YdChargerApiApplication.class, args);
        //启动WEB项目
//        try {
//            SpringApplication application = new SpringApplication(YdChargerApiApplication.class);
//            ConfigurableApplicationContext context = application.run(args);
//
//            //线程外面的方法
//            new Thread(new Runnable() {
//                public void run() {
//                    //线程里面的内容
//                    //启动服务端
//                    NettyServer nettyServer = context.getBean(NettyServer.class);
//                    nettyServer.start();
//                }
//            }).start();
//
//        }catch (Exception e){
//            e.printStackTrace();
//        }
    }
}
